-- GENERATED SPELL FOR [Skeletal Shadowcaster] --


function spell0_7340(pUnit, Event) --@Amplify Damage,n/a--
pUnit:FullCastSpellOnTarget(12248,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7340', 12000, 1)
end

function spell1_7340(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7340', 3000, 1)
end

function Sorts_7340(pUnit, Event)
local choix_sorts_7340 = math.random(0, 1)
if choix_sorts_7340 == 0 then
pUnit:RegisterEvent('spell0_7340', 1, 1)
end
if choix_sorts_7340 == 1 then
pUnit:RegisterEvent('spell1_7340', 1, 1)
end
end

function mob7340_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7340', math.random(1500, 3000), 1)
end

function mob7340_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7340_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7340_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7340, 1, 'mob7340_Action')
RegisterUnitEvent(7340, 2, 'mob7340_Leave')
RegisterUnitEvent(7340, 3, 'mob7340_Kill')
RegisterUnitEvent(7340, 4, 'mob7340_Die')
